home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / menus / mxmnu241.zip / LOGIN.MNU < prev    next >
Text File  |  1993-01-26  |  23KB  |  953 lines

  1. Comment
  2. ========================================================
  3.  
  4. Copyright 1990-92 by Marc Perkel * All right reserved.
  5.  
  6. MarxMenu now allows you to login to a Novell network without using
  7. Novell's login program or messing with nasty login scripts. You can
  8. be in MarxMenu all the way in.
  9.  
  10. Before you start on this make sure you have read the Novell section of
  11. the MarxMenu manual. This menu is somewhat tricky and requires some
  12. study before you dive right in.
  13.  
  14. Logging into Novell is tricky. Especially if you are using boot roms
  15. on your network cards. Through much trial and error, I have found
  16. some solid tricks that make life easier.
  17.  
  18. You should have the following two BATCH files in your LOGIN
  19. directory as follows:
  20.  
  21. LOADNET.BAT  ;if used with BESTNET
  22. -----------
  23. @Echo Off
  24. %NET%
  25. %NETD%
  26. Set NET=
  27. Set NETD=
  28. Startup
  29.  
  30. LOADNET.BAT  ;if not used with BESTNET
  31. -----------
  32. @Echo Off
  33. NETX
  34. F:
  35. Startup
  36.  
  37. STARTUP.BAT
  38. -----------
  39. SET BOOTUP=LOGIN
  40. MarxMenu Login
  41. %BOOTUP%
  42.  
  43. Each workstation should have their own AUTOEXEC.BAT. The last line
  44. should be LOADNET. If you are running multiple versions of dos or a
  45. variety of computers you should run BESTNET as part of your bootup
  46. sequence.
  47.  
  48. Also, if you want automatic login you can add the following lines to you
  49. AUTOEXEC.BAT file:
  50.  
  51. SET USERNAME=MARC   Your Name Here
  52. SET PASSWORD=NERD   Your Password Here
  53.  
  54. You should also change the COMSPEC= to the network command.com BEFORE
  55. you run NETX. For some unknown reason, this solves a lot of problems.
  56.  
  57. Example:
  58.  
  59. IPX
  60. SET COMSPEC=O:COMMAMD.COM
  61. NETX
  62.  
  63. Another boot rom quirk is that you can't run any program off a boot
  64. rom that trashes upper memory. An example is running QEMM on a
  65. monochrome monitor.
  66.  
  67. By using this method the boot disk or boot rom hands control over in
  68. a clean way. LOADNET.BAT then branches to STARTUP.BAT for the rest
  69. of the login sequence.
  70.  
  71. For some strange reason which I can't explain, LOADNET and STARTUP
  72. have to be two separate batch files. I think it forces the transient
  73. part of COMMAND.COM to load into memory. Anyhow, don't combine these
  74. into one batch file
  75.  
  76. The first line of STARTUP.BAT is a message that tells this menu that
  77. the user is logging in for the first time. This menu creates a batch
  78. file and puts the name of it in the environment variable BOOTUP.
  79. STARTUP.BAT then executes this file.
  80.  
  81. This is the example for MY network. You'll have to modify it for
  82. yours. I'm doing a lot of tricky things in my login. Your login might
  83. not need to be as complex as mine.
  84.  
  85. One word of caution. After modifing this menu, always run MARXCOMP
  86. LOGIN to compile it. Otherwise, if you boot up into it you won't
  87. have enough access rights to recompile automatically. I do this by
  88. making a file called L.BAT.
  89.  
  90. ME LOGIN.MNU
  91. MARXCOMP LOGIN.MNU
  92.  
  93. ========================================================
  94. EndComment
  95.  
  96. var
  97.    UserName
  98.    OldPass
  99.    NewPass
  100.    Logged
  101.    Station
  102.    SmartDir
  103.    MyServer
  104.    OrigServer
  105.    HomeDir
  106.    DosDir
  107.    Shell
  108.    Vols
  109.    PasswordExpDays
  110.    SkipError
  111.    Servers
  112.    StatusWin
  113.    TsrLoaded
  114.    DrDos6
  115.    MyGroups
  116.  
  117. Comment
  118. ========================================================
  119.  
  120. If you are using 386 NetWare then make sure you copy the program
  121. SUBLOGIN.EXE to the LOGIN directory. This will allow you to do encrypted
  122. logins. Or you can run:
  123.  
  124. SET ALLOW UNENCRYPTED PASSWORDS = ON
  125.  
  126. ========================================================
  127. EndComment
  128.  
  129. Shell = CleanFileName(%COMSPEC%)
  130. MyServer = NovDefaultServer
  131. OrigServer = MyServer
  132. NovServers(Servers)
  133. Logged = %LOGGED% = 'TRUE'
  134.  
  135. SkipError = False
  136.  
  137. TryAutoLogin  ;login using environment variables
  138.  
  139. if not Logged then LoginFromScreen
  140.  
  141. NovSetPrimaryServer (MyServer)
  142. NovSetPreferredServer (MyServer)
  143.  
  144. NovReadGroups(UserName,MyGroups)    ;Read Groups user is in.
  145. SortArray(MyGroups)
  146.  
  147. UserName = NovLoginName
  148.  
  149. %LOGGED% = ''
  150. %USERNAME% = UserName
  151. %PASSWORD% = ''
  152.  
  153. ;----- Another Server Selected
  154.  
  155. if MyServer <> OrigServer
  156.    %BOOTUP% = 'STARTUP'
  157.    %LOGGED% = 'TRUE'
  158.    NovMapDrive('F',MyServer + '/SYS:LOGIN')
  159.    ChDir('F:\LOGIN')
  160.    ExitMenu
  161. endif
  162.  
  163. ;----- You can't assume that you have an F: drive unless you map it.
  164.  
  165. NovMapDrive ('F','SYS:LOGIN')
  166.  
  167. Comment
  168. ========================================================
  169.  
  170. If a TEMP environment variable is set, MarxMenu will use it for
  171. temporary batch files. This is compatible with DOS 5 and Windows
  172. conventions. The users should be given full access rights to this
  173. directory. I'm using \TMPFILES for my network.
  174.  
  175. ========================================================
  176. EndComment
  177.  
  178. if ExistDir('F:\TMPFILES') then %TEMP% = 'F:\TMPFILES'
  179.  
  180. ;----- Here we calculate a home directory for each user.
  181.  
  182. HomeDir = 'SYS:HOME\' + UserName
  183. if UserName = 'SUPERVISOR' then HomeDir = 'SYS:SYSTEM'
  184. if not ExistDir(HomeDir) then HomeDir = 'SYS:PUBLIC\UTIL'
  185.  
  186. Comment
  187. ========================================================
  188.  
  189. Here we calulate the the name of the dos directory that matches the
  190. version of dos we are running. The directory for DOS 5.0 would be
  191. SYS:PUBLIC\DOSV5.00
  192.  
  193. ========================================================
  194. EndComment
  195.  
  196. DosDir = 'SYS:PUBLIC\DOSV' + DosVersionString
  197.  
  198. ;----- DR DOS (NovOS)
  199.  
  200. if %OS% > ''
  201.    DosDir = 'SYS:PUBLIC\' + %OS% + %VER%
  202.    DrDos6 = Value(%VER%) >= 6
  203.    if DrDos6
  204.       Bat('SHARE.EXE')
  205.    endif
  206. endif
  207.  
  208. if not ExistDir(DosDir) then DosDir = ''
  209.  
  210. Comment
  211. ========================================================
  212.  
  213. Here's where we map our drives. This does not set the search path.
  214. You set that explicitly by writing to the PATH environment variable.
  215.  
  216. SYS:--+---PUBLIC---NSK
  217.       |     |
  218.       |     +------UTIL
  219.       |     |
  220.       |     +------DOSV5.00
  221.       |     |
  222.       |     +------DRDOS6.0
  223.       |
  224.       +---HOME-----MARC
  225.       |     |
  226.       |     +------VICKI
  227.       |
  228.       +---LOGIN
  229.  
  230. Drive map commands may contain server and volume referrences:
  231.  
  232. ========================================================
  233. EndComment
  234.  
  235. NovMapRoot ('H', HomeDir)            ;Home Directory
  236. NovMapRoot ('N','SYS:PUBLIC\NSK')    ;Network Survival Kit
  237. NovMapRoot ('O', DosDir)             ;Dos Directory
  238. NovMapRoot ('U','SYS:PUBLIC\UTIL')   ;Utilities Directory
  239. NovMapRoot ('P','SYS:PUBLIC')        ;Public Directory
  240. NovMapRoot ('L','SYS:LOGIN')         ;Login Directory
  241.  
  242. Comment
  243. ========================================================
  244.  
  245. Here we set a different directory for a program depending on if we
  246. have a color or monochrome monitor.
  247.  
  248. ========================================================
  249. EndComment
  250.  
  251. if VideoMode = Mono
  252.    SmartDir = 'SYS:PUBLIC\MSMART'
  253. else
  254.    SmartDir = 'SYS:PUBLIC\CSMART'
  255. endif
  256.  
  257. if ExistDir SmartDir
  258.    NovMapRoot ('S',SmartDir)
  259. endif
  260.  
  261. Comment
  262. ========================================================
  263.  
  264. W: is a work drive. When an application needs an extra search path, I
  265. move W: to that directory.
  266.  
  267.  OnKey 'L'
  268.    |NovMapRoot('W','\PUBLIC\LOTUS')
  269.    Lotus
  270.  
  271. ========================================================
  272. EndComment
  273.  
  274. NovMapRoot('W','H:')
  275.  
  276. if NovConsoleOperator
  277.    NovMapRoot ('V','F:\SYSTEM')     ;System Directory
  278. endif
  279.  
  280. if MyServer = 'TYME'
  281.  
  282.  
  283.    ;----- Here's where I log into a second server.
  284.  
  285.    if PosInList('SHOW',Servers) > 0
  286.       NovLogin('SHOW/' + UserName,OldPass)
  287.       NovMapDrive('K','SHOW/SYS:')
  288.    endif
  289.  
  290.    ;----- Here's where I log into a third server.
  291.  
  292.    if PosInList('TSS',Servers) > 0
  293.       NovLogin('TSS/' + UserName,OldPass)
  294.       NovMapDrive('J','TSS/SYS:')
  295.    endif
  296.  
  297.    ;----- Here's where I log into another server.
  298.  
  299.    if PosInList('MARX',Servers) > 0
  300.       NovLogin('MARX/' + UserName,OldPass)
  301.       NovMapDrive('G','MARX/SYS:')
  302.    endif
  303.  
  304. endif
  305.  
  306. NovVolumes(Vols)
  307.  
  308. if PosInList('VOL1',Vols) > 0 then NovMapDrive ('I','VOL1:')
  309.  
  310. ;----- Turbo Pascal 6
  311.  
  312. if ExistDir ('H:\BP7') then NovMapRoot ('T','H:\BP7\BIN')
  313.  
  314. ;----- If no drive C then use home directory
  315.  
  316. if Floppies < 3                     ;I'm using some 4 floppy machines
  317.    if not ExistDir ('C:\') then NovMapRoot('C'